function Bomb(id) {
    var timer;
    this.start = function () {
        timer = setTimeout(function () {
            console.log(id + "炸弹爆炸");
        }, 3000)
    },
        this.clear = function () {
            clearTimeout(timer);
            console.log(id + "炸弹取消")
        }
}

var b1 = new Bomb("b1");
var b2 = new Bomb("b2");
b1.start();
b2.start();
setTimeout(b2.clear, 1000);

//b2炸弹取消
//b1炸弹爆炸